package com.itheima.exerciseTest.test20_29;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Scanner;

public class Test21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true){
            System.out.println("请输入年份");
            int year = sc.nextInt();
            LocalDate of = LocalDate.of(year, 3, 1);
            of = of.plusDays(-1);
            if(of.getDayOfMonth() == 29){
                System.out.println("闰年");
            }else{
                System.out.println("平年");
            }
            System.out.println("退出按n / N ，否则任意");
            String str = sc.nextLine();
            sc.nextLine();
            if("n".equals(str) || "N".equals(str)){
                break;
            }
        }

    }
}
